<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:web="http://www.web.com.br/jsf/webutils">



    <!--

    Tag que implementa um calendar usando o componente do Primefaces, dentro de um <web:field>

    ATRIBUTOS:

        id: Id - OBRIGATÓRIO
        label: Label - OBRIGATÓRIO
        value: Valor - OBRIGATÓRIO
        maxlength: Máximo de caracteres permitido - OPCIONAL (default = 100)
        fieldMode: Atributo mode da tag <web:field> - OPCIONAL (default = 1)
        required: Indica se é obrigatório - OPCIONAL (default = false)
        rendered: Indica se será renderizado - OPCIONAL (default = true)
        readOnly: Indica se o campo será somente leitura - OPCIONAL (default = false)

     -->

    <web:field
        label="#{label}"
        for="#{id}Text"
        mode="#{web:nvl(fieldMode, 1)}"
        required="#{web:nvl(required, false)}"
        rendered="#{web:nvl(rendered, true)}"
        addMessage="#{addMessage}">

        <!-- $NO_CHECK -->
        <p:calendar
            id="#{id}Text"
            locale="pt_BR"
            value="#{value}"
            showOn="#{web:nvl(showOn, 'button')}"
            pattern="${messages['global.date_pattern']}"
            required="#{web:nvl(required, false)}"
            mindate="#{mindate}"
            maxdate="#{maxdate}"
            disabled="#{disabled}"
            navigator="true"
            yearRange="#{web:nvl(yearRange, '2000:2020')}"
            size="#{size}"
            maxlength="10"
            style="width: #{width};"
            mask="true">

            <ui:insert />

        </p:calendar>
        <!-- $CHECK -->

    </web:field>

</ui:composition>

